package com.pengpai.pangucms.utils;

import jakarta.servlet.http.HttpServletRequest;

public class UserAgentUtils {
    public static String getDevice(HttpServletRequest request){

        String userAgent = request.getHeader("user-agent").toLowerCase();

        if (userAgent.contains("micromessenger")) {
            return "weixin";
        } else if (userAgent.contains("alipay")) {
            return "alipay";
        } else if (userAgent.contains("windows")) {
            return "windows";
        } else {
            return "unkown";
        }


    }
}
